const requestApi=(url,data,method)=>new Promise((resolve,reject)=>{
	uni.request({
		url:'/api/'+url,
		data,
		method,
		success: ((res) => {
			//console.log('code:'+res.statusCode)
			res.statusCode==200?resolve(res):reject(res);
		}),
		fail:((err)=>{
			reject(err)
		})
	})
})  
export const getA=data=>requestApi('a',data,'get');
export const postA=data=>requestApi('a',data,'post');
   